package com.magic.dto;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author admin
 * @create 2019/08/06 - 18:18
 */
@Data
@AllArgsConstructor
public class MeetingOperateDTO {
  /**
   * 执行操作的会议id
   */
  List<Integer> meetingIds;
  /**
   * 执行操作的当前用户id
   */
  Integer operatorId;
  /**
   * 延长操作的延长时间，单位分钟
   */
  Integer extendTime;
  /**
   * 拒绝理由
   */
  String refuseRemark;
  /**
   * 提醒时间（开始前，开始中）
   */
  Integer remindTime;


  public MeetingOperateDTO(Integer meetingId, Integer extendTime) {
    this.meetingIds = new ArrayList<>();
    this.meetingIds.add(meetingId);
    this.extendTime = extendTime;
  }
  public MeetingOperateDTO(Integer meetingId, String refuseRemark) {
    this.meetingIds = new ArrayList<>();
    this.meetingIds.add(meetingId);
    this.refuseRemark = refuseRemark;
  }

  public MeetingOperateDTO(Integer... meetingIds) {
    this.meetingIds = Arrays.stream(meetingIds).collect(Collectors.toList());
  }

  public MeetingOperateDTO(List<Integer> meetingIds) {
    this.meetingIds = meetingIds;
  }
}
